package com.careersersystem.entity;

/**
 * StudentempId entity. @author MyEclipse Persistence Tools
 */

public class StudentempId implements java.io.Serializable {

	// Fields

	private Employer employer;
	private Student student;
	private String cname;
	private String cemail;
	private String cphone;
	private Short status;
	private String location;
	private String description;

	// Constructors

	/** default constructor */
	public StudentempId() {
	}

	/** minimal constructor */
	public StudentempId(Employer employer, Student student, String cname,
			String cemail, String cphone, Short status) {
		this.employer = employer;
		this.student = student;
		this.cname = cname;
		this.cemail = cemail;
		this.cphone = cphone;
		this.status = status;
	}

	/** full constructor */
	public StudentempId(Employer employer, Student student, String cname,
			String cemail, String cphone, Short status, String location,
			String description) {
		this.employer = employer;
		this.student = student;
		this.cname = cname;
		this.cemail = cemail;
		this.cphone = cphone;
		this.status = status;
		this.location = location;
		this.description = description;
	}

	// Property accessors

	public Employer getEmployer() {
		return this.employer;
	}

	public void setEmployer(Employer employer) {
		this.employer = employer;
	}

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	public String getCemail() {
		return this.cemail;
	}

	public void setCemail(String cemail) {
		this.cemail = cemail;
	}

	public String getCphone() {
		return this.cphone;
	}

	public void setCphone(String cphone) {
		this.cphone = cphone;
	}

	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	public String getLocation() {
		return this.location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof StudentempId))
			return false;
		StudentempId castOther = (StudentempId) other;

		return ((this.getEmployer() == castOther.getEmployer()) || (this
				.getEmployer() != null
				&& castOther.getEmployer() != null && this.getEmployer()
				.equals(castOther.getEmployer())))
				&& ((this.getStudent() == castOther.getStudent()) || (this
						.getStudent() != null
						&& castOther.getStudent() != null && this.getStudent()
						.equals(castOther.getStudent())))
				&& ((this.getCname() == castOther.getCname()) || (this
						.getCname() != null
						&& castOther.getCname() != null && this.getCname()
						.equals(castOther.getCname())))
				&& ((this.getCemail() == castOther.getCemail()) || (this
						.getCemail() != null
						&& castOther.getCemail() != null && this.getCemail()
						.equals(castOther.getCemail())))
				&& ((this.getCphone() == castOther.getCphone()) || (this
						.getCphone() != null
						&& castOther.getCphone() != null && this.getCphone()
						.equals(castOther.getCphone())))
				&& ((this.getStatus() == castOther.getStatus()) || (this
						.getStatus() != null
						&& castOther.getStatus() != null && this.getStatus()
						.equals(castOther.getStatus())))
				&& ((this.getLocation() == castOther.getLocation()) || (this
						.getLocation() != null
						&& castOther.getLocation() != null && this
						.getLocation().equals(castOther.getLocation())))
				&& ((this.getDescription() == castOther.getDescription()) || (this
						.getDescription() != null
						&& castOther.getDescription() != null && this
						.getDescription().equals(castOther.getDescription())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getEmployer() == null ? 0 : this.getEmployer().hashCode());
		result = 37 * result
				+ (getStudent() == null ? 0 : this.getStudent().hashCode());
		result = 37 * result
				+ (getCname() == null ? 0 : this.getCname().hashCode());
		result = 37 * result
				+ (getCemail() == null ? 0 : this.getCemail().hashCode());
		result = 37 * result
				+ (getCphone() == null ? 0 : this.getCphone().hashCode());
		result = 37 * result
				+ (getStatus() == null ? 0 : this.getStatus().hashCode());
		result = 37 * result
				+ (getLocation() == null ? 0 : this.getLocation().hashCode());
		result = 37
				* result
				+ (getDescription() == null ? 0 : this.getDescription()
						.hashCode());
		return result;
	}

}